import 'package:flutter/material.dart';

import 'package:flutter_demo/widgets/groupSlotWidget.dart';
import 'package:flutter_demo/widgets/groupHeaderWidget.dart';
import 'package:flutter_demo/widgets/goodsWidget.dart';

import 'package:flutter_demo/models/goodsItem.dart';

class MLike extends StatelessWidget {
  final title;
  final List<GoodsItem> items;
  MLike({
    this.title = "猜你喜欢",
    @required this.items,
  }) : assert(items != null);

  @override
  Widget build(BuildContext context) {
    return MGroupSlot(
      header: MGroupHeader(title),
      body: MGridGoods(
        items: items,
        crossAxisCount: 2,
        childAspectRatio: 0.63,
      ),
      padding: 0.0,
    );
  }
}
